package com.bupt.ilink.entity.pojo.TeamFlow;

import com.bupt.ilink.entity.pojo.store.DownloadFlowResult;
import com.bupt.ilink.entity.store.StoreFlow;
import com.bupt.ilink.entity.store.TeamFlow;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
import lombok.Data;


@Data
@AllArgsConstructor
public class DownloadTeamFlowResult {
    private String flowId;
    private String flowName;
    private String description;
    private JsonNode data;
    private Boolean component;
    private JsonNode metaData;

    public static DownloadTeamFlowResult from(TeamFlow teamFlow)  {
        return new DownloadTeamFlowResult(
                teamFlow.getFlowId(),
                teamFlow.getFlowName(),
                teamFlow.getDescription(),
                teamFlow.getData(),
                teamFlow.getComponent(),
                teamFlow.getMetaData()
        );
    }


}
